/*
 * @Author: along
 * @Date: 2021-01-29
 * @Last Modified by: along
 * @Last Modified time: 2021-01-29
 */
<template>
    <el-dialog
        :visible.sync="dialog"
        title="预览效果"
        width="900px"
        :show-close="false"
        class="_preview_wrap"
    >
        <div class="_wrap">
            <div class="_left">
                <p class="_left_title">
                    商品详情页预览
                </p>
                <img
                    src="@/assets/image/public_shop_detail.png"
                    class="_left_imge"
                >
                <div class="_side">
                    <div class="_border">
                        <p class="_border_1" />
                        <p class="_border_2" />
                        <p class="_border_3" />
                        <p class="_border_4" />
                        <p class="_border_5" />
                        <p class="_border_6" />
                        <p class="_border_7" />
                        <p class="_border_8" />
                        <img
                            src="@/assets/image/public-logo.png"
                            class="_logo"
                        >
                        <p class="_content">
                            {{ publicContent }}
                        </p>
                    </div>
                </div>
                <div class="_line" />
            </div>
            <div
                class="_left"
                :style="{marginLeft: '42px', height: '667px'}"
            >
                <p class="_left_title">
                    店铺主页预览
                </p>
                <div class="_main">
                    <img
                        src="@/assets/image/public_shop.png"
                        class="_left_header"
                    >
                    <div class="_nav">
                        <img
                            src="@/assets/image/public-header.png"
                            class="_left_navb"
                        >
                        <p class="_titlez">
                            店铺公告
                        </p>
                        <p class="_contents">
                            {{ publicContent }}
                        </p>
                        <p class="_buttons">
                            知道了
                        </p>
                    </div>
                </div>
            </div>
        </div>
        <div
            class="_preview"
            @click="hide()"
        >
            关闭预览
        </div>
    </el-dialog>
</template>

<script>
export default {
    props: {
        publicContent: {
            type: String,
            default: ''
        }
    },
    data () {
        return {
            dialog: false
        };
    },
    methods: {
        show () {
            this.dialog = true;
        },
        hide () {
            this.dialog = false;
        }
    }

};
</script>

<style lang="less" scoped>
._wrap {
    display: flex;
    height: 500px;
    overflow-y: auto;
    padding-left: 54px;
    padding-right: 54px;
    padding-top: 24px;
    box-sizing: border-box;
    ._left {
        width: 375px;
        display: flex;
        flex-direction: column;
        ._left_title {
            color: rgba(51, 51, 51, 1);
            font-size: 16px;
            margin-bottom: 19px;
            font-weight: 500;
        }
        ._left_imge {
            width: 375px;
            height: 746px;
        }
        ._side {
            width: 375px;
            background: rgba(193, 62, 50, 1);
            box-sizing: border-box;
            padding: 6px;
            ._border {
                width: 100%;
                height: 100%;
                border: 1px rgba(247, 195, 147, 1) solid;
                position: relative;
                display: flex;
                flex-direction: column;
                align-items: center;
                padding-bottom: 15px;
                box-sizing: border-box;
                ._border_1 {
                    width: 1px;
                    height: 12px;
                    position: absolute;
                    top: 0;
                    left: 12px;
                    z-index: 1;
                    background: rgba(247, 195, 147, 1);
                }
                ._border_2 {
                    width: 1px;
                    height: 12px;
                    position: absolute;
                    top: 0;
                    right: 12px;
                    z-index: 1;
                    background: rgba(247, 195, 147, 1);
                }
                ._border_3 {
                    width: 1px;
                    height: 12px;
                    position: absolute;
                    bottom: 0;
                    right: 12px;
                    z-index: 1;
                    background: rgba(247, 195, 147, 1);
                }
                ._border_4 {
                    width: 1px;
                    height: 12px;
                    position: absolute;
                    bottom: 0;
                    left: 12px;
                    z-index: 1;
                    background: rgba(247, 195, 147, 1);
                }
                ._border_5 {
                    width: 12px;
                    height: 1px;
                    position: absolute;
                    left: 0;
                    top: 12px;
                    z-index: 1;
                    background: rgba(247, 195, 147, 1);
                }
                ._border_6 {
                    width: 12px;
                    height: 1px;
                    position: absolute;
                    right: 0;
                    top: 12px;
                    z-index: 1;
                    background: rgba(247, 195, 147, 1);
                }
                ._border_7 {
                    width: 12px;
                    height: 1px;
                    position: absolute;
                    left: 0;
                    bottom: 12px;
                    z-index: 1;
                    background: rgba(247, 195, 147, 1);
                }
                ._border_8 {
                    width: 12px;
                    height: 1px;
                    position: absolute;
                    right: 0;
                    bottom: 12px;
                    z-index: 1;
                    background: rgba(247, 195, 147, 1);
                }
                ._logo {
                    width: 222px;
                    height: 60px;
                    margin: 20px 0 13px 0;
                }
                ._content {
                    width: 333px;
                    color: rgba(255, 240, 218, 1);
                    font-size: 14px;
                    line-height: 20px;
                }
            }
        }
        ._line {
            width: 100%;
            height: 46px;
            background: red;
        }
        ._main {
            width: 375px;
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
            height: 667px;
            ._left_header {
                width: 375px;
                height: 667px;
                position: absolute;
                left: 0;
                top: 0;
                z-index: 0;
            }
            ._nav {
                width: 291px;
                display: flex;
                flex-direction: column;
                align-items: center;
                background: #ffffff;
                border-radius: 16px;
                position: absolute;
                left: 42px;
                z-index: 10;
                ._left_navb {
                    width: 291px;
                    height: 124px;
                }
                ._titlez {
                    color: rgba(51, 51, 51, 1);
                    font-size: 16px;
                    font-weight: 500;
                    margin: 22px 0 18px 0;
                }
                ._contents {
                    color: rgba(102, 102, 102, 1);
                    font-size: 14px;
                    line-height: 22px;
                    width: 251px;
                    margin-bottom: 24px;
                }
                ._buttons {
                    width: 221px;
                    height: 40px;
                    border-radius: 20px;
                    background: linear-gradient(135deg, #19DFA9 0%, #20A0FF 100%);
                    text-align: center;
                    line-height: 40px;
                    color: #ffffff;
                    font-size: 14px;
                    margin-bottom: 30px;
                }
            }
        }
    }
}
._preview {
    width: 100%;
    height: 66px;
    text-align: center;
    line-height: 66px;
    color: rgba(24, 144, 255, 1);
    font-size: 20px;
    cursor: pointer;
    border-top: 1px rgba(228, 228, 228, 1) solid;
}
</style>